﻿<div>
  <input name="hogehoge" type="text">
  <input name="hogesubmit" type="submit" value="submit">
</div>
<script type="text/javascript">

function submit( ) {
  bg.postStatus( document.getElementsByName( 'hogehoge' )[ 0 ].value, notifyUpdate ) ;
}

function notifyUpdate( request ) {
  window.alert( 1 ) ;
  window.alert( request ) ;
  window.alert( 'post : ' + request.text ) ;
}

var bg = chrome.extension.getBackgroundPage( ) ;
document.getElementsByName( 'hogehoge' )[ 0 ].value = bg.currentPageUrl ;

document.getElementsByName( 'hogesubmit' )[ 0 ].addEventListener( "click", submit ) ;

</script>
